import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from "@/layout/layout.vue";
import LoginView from "@/views/LoginView.vue";


Vue.use(VueRouter)

const routes = [
  //   登录路由
  {
    path: '/',
    alias: '/login',
    name: 'Login',
    component: LoginView,
  },
  {

    path: '/home',
    name: 'home',
    component: Layout,
    children: [
      {path: '/', alias: '/content' , name: 'content', component: () => import("@/views/ContentView.vue")},
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
